
//引模块
require("../../assets/css/index.less");
//引当前模块
require("./mybadge.less");
//引入公共js模块
let dom = require("../../utils/dom.js");
let https = require("../../utils/https.js");

// dom.getEle("header").addEventListener("click", function () {
//    
// })


let newdata = [
    require("../../assets/imgs/mybadge01.jpg"),
    require("../../assets/imgs/mybadge02.jpg"),
    require("../../assets/imgs/mybadge03.jpg"),
    require("../../assets/imgs/mybadge04.jpg"),
    require("../../assets/imgs/mybadge05.jpg"),
    require("../../assets/imgs/mybadge06.jpg"),
    require("../../assets/imgs/mybadge07.jpg"),
    require("../../assets/imgs/mybadge08.jpg"),
    require("../../assets/imgs/mybadge09.jpg"),

]
dom.ready(function () {

    https.get("/api/exercise/badge", (res) => {
        res.data.forEach((v) => {
            dom.getEle('#main').innerHTML += `
    <div>
    <img src="${newdata[v.id]}" alt="" width="90">
        </div>
    `

        });



    })

    dom.getEle("header").addEventListener("click", function () {
        location.href = "myhome.html"
    })





})

